CC=g++
CFLAGS=-Wall -lwiringPi -lpthread -lmpdclient -std=c++0x
LDFLAGS=-lwiringPi -lpthread -lmpdclient -std=c++0x
EXEC=rpi-GMPIO2MPD
SRC= $(wildcard *.cpp)
OBJ= $(SRC:.cpp=.o)

all: $(EXEC)

$(EXEC): $(OBJ)
		@$(CC) -o $@ $^ $(LDFLAGS)

%.o: %.cpp
		@$(CC) -o $@ -c $< $(CFLAGS)

.PHONY: clean mrproper

clean:
		@rm -rf *.o

mrproper: clean
		@rm -rf $(EXEC)

